Make sure that the placement of the texts under the bullets is
the same whether the highlight is on or off. Otherwise, the list
is shifting a bit to the right to make room for highlight 'bullets'
when we press the highlight key.
Bonus: Make sure the highlight container is only appended to each
bullet once, even if the process is called for more than once on
the same content.
Bug: T163275
Bug: T163387
Change-Id: I4c2cf6176d5129dd2bc37d2f58ed84e85aca8560
}
}
+ ul {
+ // Each li's margin-left should be the width of the highlights
+ // element + the margin
+ margin-left: ~'calc( ( @{result-circle-diameter} + @{result-circle-margin} ) * 5 + @{result-circle-general-margin} )';
+ }
+
&-highlighted {
ul {
list-style: none;
- // Each li's margin-left should be the width of the highlights
- // element + the margin
- margin-left: ~'calc( ( @{result-circle-diameter} + @{result-circle-margin} ) * 5 + @{result-circle-general-margin} )';
li {
list-style: none;
.prop( 'data-color', 'none' )
);
+ if ( $( '.mw-rcfilters-ui-changesListWrapperWidget-highlights' ).length ) {
+ // Already set up
+ return;
+ }
+
mw.rcfilters.HighlightColors.forEach( function ( color ) {
$highlights.append(
$( '<div>' )